import 'package:json_annotation/json_annotation.dart';
part 'village.g.dart';

@JsonSerializable()
class VillageListResult {
  VillageListResult();

  int companyId;
  String companyName;
  List<VillageSimpleResult> villageList;

  //不同的类使用不同的mixin即可
  factory VillageListResult.fromJson(Map<String, dynamic> json) =>
      _$VillageListResultFromJson(json);
  Map<String, dynamic> toJson() => _$VillageListResultToJson(this);
}

@JsonSerializable()
class VillageSimpleResult {
  VillageSimpleResult();
  int total;
  int villageId;
  String villageName;

  //不同的类使用不同的mixin即可
  factory VillageSimpleResult.fromJson(Map<String, dynamic> json) =>
      _$VillageSimpleResultFromJson(json);
  Map<String, dynamic> toJson() => _$VillageSimpleResultToJson(this);
}
